<?php
include( "agent/onlinebet_header8.php" );
$gameArr = array(29 => "五不中", 39 => "六不中", 40 => "七不中", 41 => "八不中", 42 => "九不中", 43 => "十不中", 44 => "十一不中", 45 => "十二不中");
$gameStr = implode(",", array_keys($gameArr));
$sql = "select * from bet where bettype in ({$gameStr}) and lotto_id={$lotto_id} and rame in (0,9)";
if ($curruser['acl'] != 255)
{
    $userlist = GetUserList($curruser['id']);
    if ($userlist == "")
    {
        $ui->showErrorPage("<p>还没有建立会员！</p>");
        exit();
    }
    $sql .= " and user_id in ({$userlist})";
}
$g_disk_code = array(1 => "a", 2 => "b", 3 => "c", 4 => "d");
$disk_code = "a";
if (0 < $disk)
{
    $sql .= " and disk=" . $disk;
    $disk_code = $g_disk_code[$disk];
}
$tabTitleLi = "<li><a href=\"#tabs-top20\">TOP 20</a></li>";
$tabDataDiv = "<div id=\"tabs-top20\">TOP 20</div>";
$top20HeadTd = "";
foreach ($gameArr as $key => $val)
{
    $tabTitleLi .= "<li><a href=\"#tabs-{$key}\">{$val}</a></li>";
    $tabDataDiv .= "<div id=\"tabs-{$key}\"><img src=\"image/loading.gif\" width=\"15\" height=\"15\" alt=\"*\"> [{$val}] 资料载入中, 请稍後...</div>";
    $top20HeadTd .= "<th>{$val}</th>";
}
$tpl->load("main", "onlinebet8.htm");
$tpl->set(array("tabTitleLi" => $tabTitleLi, "tabDataDiv" => $tabDataDiv, "top20HeadTd" => $top20HeadTd, "top20BetStr" => $gameStr, "numberUrl" => get_listurl5($open, 29, ""), "urlOpenDt" => $open));
$tpl->show("main");
$ui->footer();